package 泛型;

import java.lang.reflect.InvocationTargetException;

public class 反射与泛型 {
    private String name;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Class<反射与泛型> 反射与泛型Class = 反射与泛型.class;
        反射与泛型 反射与泛型 = 反射与泛型Class.getConstructor().newInstance();
        反射与泛型.setName("张三");
        System.out.println(反射与泛型.getName());
    }
}
